<div class="main-container" id="main-container" xmlns:th="http://www.thymeleaf.org">
    <div class="main-container-inner">
        <div class="main-content">
            <div class="page-content">
                <div class="row">
                    <form class="form-horizontal"  role="form" id="add_form" >
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="rentName" class="col-sm-3 control-label">客户名称</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="rentName" name="rentName" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentType" class="col-sm-3 control-label">客户类型</label>
                                <div class="col-sm-7">
                                    <select class="form-control" id="rentType" name="rentType">
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentTrade" class="col-sm-3 control-label">所属行业</label>
                                <div class="col-sm-7">
                                    <select class="form-control" id="rentTrade" name="rentTrade">
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentScale" class="col-sm-3 control-label">客户规模</label>
                                <div class="col-sm-7">
                                    <select class="form-control" id="rentScale" name="rentScale">
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentUser" class="col-sm-3 control-label">联系人</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="rentUser" name="rentUser" />
                                </div>
                            </div>
                        </div>
                        <div class="col-md-6">
                            <div class="form-group">
                                <label for="rentPhone" class="col-sm-3 control-label">联系电话</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="rentPhone" name="rentPhone" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentAddress" class="col-sm-3 control-label">联系地址</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="rentAddress" name="rentAddress" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentWebsite" class="col-sm-3 control-label">客户网站</label>
                                <div class="col-sm-7">
                                    <input type="text" class="form-control" id="rentWebsite" name="rentWebsite" />
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="rentDescribe" class="col-sm-3 control-label">客户描述</label>
                                <div class="col-sm-7">
                                    <textarea  rows="3" type="text" class="form-control" id="rentDescribe" name="rentDescribe"></textarea>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    $(function () {
        ajaxs('./DDictionary/searchByType/rent_type', 'GET', null, true, function (typedata) {
            for (var i = 0; i < typedata.length; i++) {
                $("#rentType").append("<option value="+typedata[i].key+">"+typedata[i].value+"</option>")
            }
        });
        ajaxs('./DDictionary/searchByType/rent_scale', 'GET', null, true, function (typedata) {
            for (var i = 0; i < typedata.length; i++) {
                $("#rentScale").append("<option value="+typedata[i].key+">"+typedata[i].value+"</option>")
            }
        });
        ajaxs('./DDictionary/searchByType/rent_trade', 'GET', null, true, function (typedata) {
            for (var i = 0; i < typedata.length; i++) {
                $("#rentTrade").append("<option value="+typedata[i].key+">"+typedata[i].value+"</option>")
            }
        });
    });
    function form_sub() {
        ajaxs('./DRent', 'POST',$("#add_form").serialize(), true, function(data){
            if(data.state=='success') {
                $("#im_unique_dlg").modal('hide');
                layer.msg(data.message);
                $("#rentTable table").bootstrapTable('refresh');
            } else {
                layer.msg(data.message);
            }
        });
    }
</script>